call apply and bind method in javascript